import { get, post_json } from '@/http/axios'
export default {
  namespaced: true,
  state: {
    // 产品数据
    productData:[]
  },
  mutations: {
    SET_PRODUCTDATA(state, payload){
      state.productData = payload
    }
  },
  actions: {
    // 获取产品数据
    async getAllProductData({commit}, payload){
      let res = await get('/product/pageQuery', payload)
      // console.log(res);
      commit('SET_PRODUCTDATA', res.data.data.list)
    }
  }
}